package com.EAIPClub.CodeShellManager.mapper;

import com.api.POJO.CodeLab.CodeShellManager.CodeShellManagerContentInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

/**
 * @Description :
 * @Author :
 * @Date : 2021/12/11
 */
@Mapper
@Repository
public interface CodeShellContentManagerMapper {
    @Insert("INSERT INTO t_content VALUES (null,'${data.uid}','${data.content}')")
    Boolean addNewCodeShellContent(@Param("data") CodeShellManagerContentInfo data);

    @Select("SELECT * FROM t_content WHERE uid = '${uid}'")
    CodeShellManagerContentInfo getCodeShellContentByUid(@Param("uid") String uid);

    @Delete("DELETE FROM t_content WHERE uid = '${uid}'")
    Boolean deleteCodeShellContentByUid(@Param("uid") String uid);

}
